﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;

namespace Kkc.Application.Specifications
{
    public interface ISpecification<T>
    {
        /// <summary>
        /// Determines whether the <see cref="ISpecification{T}">specification</see> is satisfied by the specified entity.
        /// </summary>
        /// <param name="entity">The entity.</param>
        /// <returns>
        /// 	<c>true</c> if the specification is satisfied by the specified entity; otherwise, <c>false</c>.
        /// </returns>
        bool IsSatisfiedBy(T entity);

        /// <summary>
        /// Gets the expression.
        /// </summary>
        /// <value>The expression.</value>
        Expression<Func<T, bool>> Expression
        {
            get;
        }
    }
}
